<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <link rel="stylesheet" href="../resource/css/bootstrap.min.css" th:href="@{/resource/css/bootstrap.min.css}">
    <link href="../resource/hotui/css/font-awesome.min.css" th:href="@{/resource/hotui/css/font-awesome.min.css}"
        rel="stylesheet">
    <link href="../resource/hotui/css/animate.min.css" th:href="@{/resource/hotui/css/animate.min.css}"
        rel="stylesheet">
    <link href="../resource/hotui/css/style.min-1.0.8.css" th:href="@{/resource/hotui/css/style.min-1.0.8.css}"
        rel="stylesheet">
    <link href="../resource/hotui/css/login.min.css" th:href="@{/resource/hotui/css/login.min.css}" rel="stylesheet">
    <link rel="icon" href="../resource/hotui/img/favicon.ico" type="image/x-icon">
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>
        if (window.top !== window.self) {
            window.top.location = window.location
        }
    </script>
 
</head>

<body class="signin">
    <div class="signinpanel flex-wrap">
        <div class="sa">
            <p>可视化物联网综合管控平台</p>
            <p style="margin-top: 0px;font-size: 14px;font-weight: 0;">Copyright©2020 上海简识电子科技有限公司版权所有</p>
        </div>
        <div class="bg">
            <div class="row">
                <div style="width: 340px;float: right;margin-right: 10px;">
                    <form id="saveForm" method="post" action="/login">
                        <input type="hidden" name="role" value="管理员" th:value="${role}" />

                        <h4 class="no-margins">管控系统登录</h4>
                        <input type="text" class="form-control uname" name="username" placeholder="用户名" />
                        <input type="password" class="form-control pword m-b" name="password" placeholder="密码" />
                        <th:block th:if="${session.verifyTag!=null}">
                            <div class="form-inline">
                                <input name="verifyCode" placeholder="验证码" type="text" class="form-control m-t-none cd"
                                    style="color:#000000;float: left;width: 150px;" />
                                <img th:src="@{/verifyCode}" onclick="LoadVerifyCode(this);"
                                    style="width: 107px; height: 50px;float: right;border-radius: 3px;cursor: pointer;" />
                            </div>

                            <p style="height: 50px;"></p>
                        </th:block>

                        <button class="btn btn-success btn-block">登录</button>
                    </form>
                </div>
            </div>
        </div> 
        
    </div>
   
</body>
<script src="../resource/js/jquery.min.js?20190316" th:src="@{/resource/js/jquery.min.js?20190316}"></script>
<script src="../resource/hotui/js/hot/bootstrap.hot.extra-utils.js?20190316"
    th:src="@{/resource/hotui/js/hot/bootstrap.hot.extra-utils.js?20190316}"></script>

<script type="text/javascript" th:inline="javascript">
    var failedFlag = /*[[${failedFlag}]]*/ false;
    var errorMsg = /*[[${errMsg}]]*/ "";
    $(function () {
        if (failedFlag) {
            hot.tip.error(errorMsg);
        }

        $("#saveForm").submit(function () {
            editHandler.clear();
        })
    });

    var baseUrl = /*[[@{/verifyCode}]]*/ "/verifyCode";

    function LoadVerifyCode(obj) {
        $(obj).attr('src', baseUrl + "?rnd=" + Math.random());
    }

    var editHandler = {
        clear: function () {
            localStorage.clear();
        }
    }
</script>

</html>